package com.gymmsystem.GYMMSystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("reservations")
public class Reservation {
    // 预约ID
    @TableId(value = "r_id", type = IdType.AUTO)
    private Long rId;

    // 会员ID
    @TableField("r_u_id")
    @JsonProperty("rUId")
    private Long rUId;

    // 课程ID
    @TableField("r_c_id")
    @JsonProperty("rCId")
    private Long rCId;

    // 教练ID
    @TableField("r_t_id")
    @JsonProperty("rTId")
    private Long rTId;

    // 预约状态：预约中、已确认、已完成、已取消
    @TableField("r_status")
    @JsonProperty("rStatus")
    private String rStatus;

    // 预约创建时间
    @TableField(value = "r_created_at", fill = FieldFill.INSERT)
    @JsonProperty("rCreatedAt")
    private LocalDateTime rCreatedAt;

    // 更新时间
    @TableField(value = "r_updated_at", fill = FieldFill.INSERT_UPDATE)
    @JsonProperty("rUpdatedAt")
    private LocalDateTime rUpdatedAt;

    // 取消时间
    @TableField("r_cancel_time")
    @JsonProperty("rCancelTime")
    private LocalDateTime rCancelTime;

    // 取消原因
    @TableField("r_cancel_reason")
    @JsonProperty("rCancelReason")
    private String rCancelReason;

    // 备注
    @TableField("r_notes")
    @JsonProperty("rNotes")
    private String rNotes;
}